package com.company.cm.cm.cm.weather_info.generated;

import com.company.cm.cm.cm.weather_info.WeatherInfo;
import com.speedment.common.annotation.GeneratedCode;
import com.speedment.runtime.config.identifier.ColumnIdentifier;
import com.speedment.runtime.config.identifier.TableIdentifier;
import com.speedment.runtime.core.util.OptionalUtil;
import com.speedment.runtime.field.ComparableField;
import com.speedment.runtime.field.IntField;
import com.speedment.runtime.field.StringField;
import com.speedment.runtime.typemapper.TypeMapper;

import java.math.BigDecimal;
import java.sql.Timestamp;
import java.util.Optional;
import java.util.OptionalDouble;
import java.util.OptionalLong;

/**
 * The generated base for the {@link
 * com.company.cm.cm.cm.weather_info.WeatherInfo}-interface representing
 * entities of the {@code weather_info}-table in the database.
 * <p>
 * This file has been automatically generated by Speedment. Any changes made to
 * it will be overwritten.
 * 
 * @author Speedment
 */
@GeneratedCode("Speedment")
public interface GeneratedWeatherInfo {
    
    /**
     * This Field corresponds to the {@link WeatherInfo} field that can be
     * obtained using the {@link WeatherInfo#getId()} method.
     */
    IntField<WeatherInfo, Integer> ID = IntField.create(
        Identifier.ID,
        WeatherInfo::getId,
        WeatherInfo::setId,
        TypeMapper.primitive(),
        true
    );
    /**
     * This Field corresponds to the {@link WeatherInfo} field that can be
     * obtained using the {@link WeatherInfo#getStationNumber()} method.
     */
    StringField<WeatherInfo, String> STATION_NUMBER = StringField.create(
        Identifier.STATION_NUMBER,
        o -> OptionalUtil.unwrap(o.getStationNumber()),
        WeatherInfo::setStationNumber,
        TypeMapper.identity(),
        false
    );
    /**
     * This Field corresponds to the {@link WeatherInfo} field that can be
     * obtained using the {@link WeatherInfo#getTemperature()} method.
     */
    ComparableField<WeatherInfo, BigDecimal, BigDecimal> TEMPERATURE = ComparableField.create(
        Identifier.TEMPERATURE,
        o -> OptionalUtil.unwrap(o.getTemperature()),
        WeatherInfo::setTemperature,
        TypeMapper.identity(),
        false
    );
    /**
     * This Field corresponds to the {@link WeatherInfo} field that can be
     * obtained using the {@link WeatherInfo#getCurrentWeather()} method.
     */
    StringField<WeatherInfo, String> CURRENT_WEATHER = StringField.create(
        Identifier.CURRENT_WEATHER,
        o -> OptionalUtil.unwrap(o.getCurrentWeather()),
        WeatherInfo::setCurrentWeather,
        TypeMapper.identity(),
        false
    );
    /**
     * This Field corresponds to the {@link WeatherInfo} field that can be
     * obtained using the {@link WeatherInfo#getWindDirection()} method.
     */
    ComparableField<WeatherInfo, Double, Double> WIND_DIRECTION = ComparableField.create(
        Identifier.WIND_DIRECTION,
        o -> OptionalUtil.unwrap(o.getWindDirection()),
        WeatherInfo::setWindDirection,
        TypeMapper.identity(),
        false
    );
    /**
     * This Field corresponds to the {@link WeatherInfo} field that can be
     * obtained using the {@link WeatherInfo#getWindLevel()} method.
     */
    ComparableField<WeatherInfo, Long, Long> WIND_LEVEL = ComparableField.create(
        Identifier.WIND_LEVEL,
        o -> OptionalUtil.unwrap(o.getWindLevel()),
        WeatherInfo::setWindLevel,
        TypeMapper.identity(),
        false
    );
    /**
     * This Field corresponds to the {@link WeatherInfo} field that can be
     * obtained using the {@link WeatherInfo#getPmLevel()} method.
     */
    ComparableField<WeatherInfo, Float, Float> PM_LEVEL = ComparableField.create(
        Identifier.PM_LEVEL,
        o -> OptionalUtil.unwrap(o.getPmLevel()),
        WeatherInfo::setPmLevel,
        TypeMapper.identity(),
        false
    );
    /**
     * This Field corresponds to the {@link WeatherInfo} field that can be
     * obtained using the {@link WeatherInfo#getRelaHumi()} method.
     */
    ComparableField<WeatherInfo, Double, Double> RELA_HUMI = ComparableField.create(
        Identifier.RELA_HUMI,
        o -> OptionalUtil.unwrap(o.getRelaHumi()),
        WeatherInfo::setRelaHumi,
        TypeMapper.identity(),
        false
    );
    /**
     * This Field corresponds to the {@link WeatherInfo} field that can be
     * obtained using the {@link WeatherInfo#getRainCount()} method.
     */
    ComparableField<WeatherInfo, BigDecimal, BigDecimal> RAIN_COUNT = ComparableField.create(
        Identifier.RAIN_COUNT,
        o -> OptionalUtil.unwrap(o.getRainCount()),
        WeatherInfo::setRainCount,
        TypeMapper.identity(),
        false
    );
    /**
     * This Field corresponds to the {@link WeatherInfo} field that can be
     * obtained using the {@link WeatherInfo#getCreateTime()} method.
     */
    ComparableField<WeatherInfo, Timestamp, Timestamp> CREATE_TIME = ComparableField.create(
        Identifier.CREATE_TIME,
        o -> OptionalUtil.unwrap(o.getCreateTime()),
        WeatherInfo::setCreateTime,
        TypeMapper.identity(),
        false
    );
    /**
     * This Field corresponds to the {@link WeatherInfo} field that can be
     * obtained using the {@link WeatherInfo#getObservationDataDate()} method.
     */
    ComparableField<WeatherInfo, Timestamp, Timestamp> OBSERVATION_DATA_DATE = ComparableField.create(
        Identifier.OBSERVATION_DATA_DATE,
        o -> OptionalUtil.unwrap(o.getObservationDataDate()),
        WeatherInfo::setObservationDataDate,
        TypeMapper.identity(),
        false
    );
    /**
     * This Field corresponds to the {@link WeatherInfo} field that can be
     * obtained using the {@link WeatherInfo#getUpdateTime()} method.
     */
    ComparableField<WeatherInfo, Timestamp, Timestamp> UPDATE_TIME = ComparableField.create(
        Identifier.UPDATE_TIME,
        o -> OptionalUtil.unwrap(o.getUpdateTime()),
        WeatherInfo::setUpdateTime,
        TypeMapper.identity(),
        false
    );
    /**
     * This Field corresponds to the {@link WeatherInfo} field that can be
     * obtained using the {@link WeatherInfo#getDeviceId()} method.
     */
    ComparableField<WeatherInfo, Long, Long> DEVICE_ID = ComparableField.create(
        Identifier.DEVICE_ID,
        o -> OptionalUtil.unwrap(o.getDeviceId()),
        WeatherInfo::setDeviceId,
        TypeMapper.identity(),
        false
    );
    /**
     * This Field corresponds to the {@link WeatherInfo} field that can be
     * obtained using the {@link WeatherInfo#getCanopyTemperature()} method.
     */
    ComparableField<WeatherInfo, Double, Double> CANOPY_TEMPERATURE = ComparableField.create(
        Identifier.CANOPY_TEMPERATURE,
        o -> OptionalUtil.unwrap(o.getCanopyTemperature()),
        WeatherInfo::setCanopyTemperature,
        TypeMapper.identity(),
        false
    );
    
    /**
     * Returns the id of this WeatherInfo. The id field corresponds to the
     * database column cm.cm.weather_info.id.
     * 
     * @return the id of this WeatherInfo
     */
    int getId();
    
    /**
     * Returns the stationNumber of this WeatherInfo. The stationNumber field
     * corresponds to the database column cm.cm.weather_info.station_number.
     * 
     * @return the stationNumber of this WeatherInfo
     */
    Optional<String> getStationNumber();
    
    /**
     * Returns the temperature of this WeatherInfo. The temperature field
     * corresponds to the database column cm.cm.weather_info.temperature.
     * 
     * @return the temperature of this WeatherInfo
     */
    Optional<BigDecimal> getTemperature();
    
    /**
     * Returns the currentWeather of this WeatherInfo. The currentWeather field
     * corresponds to the database column cm.cm.weather_info.current_weather.
     * 
     * @return the currentWeather of this WeatherInfo
     */
    Optional<String> getCurrentWeather();
    
    /**
     * Returns the windDirection of this WeatherInfo. The windDirection field
     * corresponds to the database column cm.cm.weather_info.wind_direction.
     * 
     * @return the windDirection of this WeatherInfo
     */
    OptionalDouble getWindDirection();
    
    /**
     * Returns the windLevel of this WeatherInfo. The windLevel field
     * corresponds to the database column cm.cm.weather_info.wind_level.
     * 
     * @return the windLevel of this WeatherInfo
     */
    OptionalLong getWindLevel();
    
    /**
     * Returns the pmLevel of this WeatherInfo. The pmLevel field corresponds to
     * the database column cm.cm.weather_info.pm_level.
     * 
     * @return the pmLevel of this WeatherInfo
     */
    Optional<Float> getPmLevel();
    
    /**
     * Returns the relaHumi of this WeatherInfo. The relaHumi field corresponds
     * to the database column cm.cm.weather_info.rela_humi.
     * 
     * @return the relaHumi of this WeatherInfo
     */
    OptionalDouble getRelaHumi();
    
    /**
     * Returns the rainCount of this WeatherInfo. The rainCount field
     * corresponds to the database column cm.cm.weather_info.rain_count.
     * 
     * @return the rainCount of this WeatherInfo
     */
    Optional<BigDecimal> getRainCount();
    
    /**
     * Returns the createTime of this WeatherInfo. The createTime field
     * corresponds to the database column cm.cm.weather_info.create_time.
     * 
     * @return the createTime of this WeatherInfo
     */
    Optional<Timestamp> getCreateTime();
    
    /**
     * Returns the observationDataDate of this WeatherInfo. The
     * observationDataDate field corresponds to the database column
     * cm.cm.weather_info.observation_data_date.
     * 
     * @return the observationDataDate of this WeatherInfo
     */
    Optional<Timestamp> getObservationDataDate();
    
    /**
     * Returns the updateTime of this WeatherInfo. The updateTime field
     * corresponds to the database column cm.cm.weather_info.update_time.
     * 
     * @return the updateTime of this WeatherInfo
     */
    Optional<Timestamp> getUpdateTime();
    
    /**
     * Returns the deviceId of this WeatherInfo. The deviceId field corresponds
     * to the database column cm.cm.weather_info.device_id.
     * 
     * @return the deviceId of this WeatherInfo
     */
    OptionalLong getDeviceId();
    
    /**
     * Returns the canopyTemperature of this WeatherInfo. The canopyTemperature
     * field corresponds to the database column
     * cm.cm.weather_info.canopy_temperature.
     * 
     * @return the canopyTemperature of this WeatherInfo
     */
    OptionalDouble getCanopyTemperature();
    
    /**
     * Sets the id of this WeatherInfo. The id field corresponds to the database
     * column cm.cm.weather_info.id.
     * 
     * @param id to set of this WeatherInfo
     * @return   this WeatherInfo instance
     */
    WeatherInfo setId(int id);
    
    /**
     * Sets the stationNumber of this WeatherInfo. The stationNumber field
     * corresponds to the database column cm.cm.weather_info.station_number.
     * 
     * @param stationNumber to set of this WeatherInfo
     * @return              this WeatherInfo instance
     */
    WeatherInfo setStationNumber(String stationNumber);
    
    /**
     * Sets the temperature of this WeatherInfo. The temperature field
     * corresponds to the database column cm.cm.weather_info.temperature.
     * 
     * @param temperature to set of this WeatherInfo
     * @return            this WeatherInfo instance
     */
    WeatherInfo setTemperature(BigDecimal temperature);
    
    /**
     * Sets the currentWeather of this WeatherInfo. The currentWeather field
     * corresponds to the database column cm.cm.weather_info.current_weather.
     * 
     * @param currentWeather to set of this WeatherInfo
     * @return               this WeatherInfo instance
     */
    WeatherInfo setCurrentWeather(String currentWeather);
    
    /**
     * Sets the windDirection of this WeatherInfo. The windDirection field
     * corresponds to the database column cm.cm.weather_info.wind_direction.
     * 
     * @param windDirection to set of this WeatherInfo
     * @return              this WeatherInfo instance
     */
    WeatherInfo setWindDirection(Double windDirection);
    
    /**
     * Sets the windLevel of this WeatherInfo. The windLevel field corresponds
     * to the database column cm.cm.weather_info.wind_level.
     * 
     * @param windLevel to set of this WeatherInfo
     * @return          this WeatherInfo instance
     */
    WeatherInfo setWindLevel(Long windLevel);
    
    /**
     * Sets the pmLevel of this WeatherInfo. The pmLevel field corresponds to
     * the database column cm.cm.weather_info.pm_level.
     * 
     * @param pmLevel to set of this WeatherInfo
     * @return        this WeatherInfo instance
     */
    WeatherInfo setPmLevel(Float pmLevel);
    
    /**
     * Sets the relaHumi of this WeatherInfo. The relaHumi field corresponds to
     * the database column cm.cm.weather_info.rela_humi.
     * 
     * @param relaHumi to set of this WeatherInfo
     * @return         this WeatherInfo instance
     */
    WeatherInfo setRelaHumi(Double relaHumi);
    
    /**
     * Sets the rainCount of this WeatherInfo. The rainCount field corresponds
     * to the database column cm.cm.weather_info.rain_count.
     * 
     * @param rainCount to set of this WeatherInfo
     * @return          this WeatherInfo instance
     */
    WeatherInfo setRainCount(BigDecimal rainCount);
    
    /**
     * Sets the createTime of this WeatherInfo. The createTime field corresponds
     * to the database column cm.cm.weather_info.create_time.
     * 
     * @param createTime to set of this WeatherInfo
     * @return           this WeatherInfo instance
     */
    WeatherInfo setCreateTime(Timestamp createTime);
    
    /**
     * Sets the observationDataDate of this WeatherInfo. The observationDataDate
     * field corresponds to the database column
     * cm.cm.weather_info.observation_data_date.
     * 
     * @param observationDataDate to set of this WeatherInfo
     * @return                    this WeatherInfo instance
     */
    WeatherInfo setObservationDataDate(Timestamp observationDataDate);
    
    /**
     * Sets the updateTime of this WeatherInfo. The updateTime field corresponds
     * to the database column cm.cm.weather_info.update_time.
     * 
     * @param updateTime to set of this WeatherInfo
     * @return           this WeatherInfo instance
     */
    WeatherInfo setUpdateTime(Timestamp updateTime);
    
    /**
     * Sets the deviceId of this WeatherInfo. The deviceId field corresponds to
     * the database column cm.cm.weather_info.device_id.
     * 
     * @param deviceId to set of this WeatherInfo
     * @return         this WeatherInfo instance
     */
    WeatherInfo setDeviceId(Long deviceId);
    
    /**
     * Sets the canopyTemperature of this WeatherInfo. The canopyTemperature
     * field corresponds to the database column
     * cm.cm.weather_info.canopy_temperature.
     * 
     * @param canopyTemperature to set of this WeatherInfo
     * @return                  this WeatherInfo instance
     */
    WeatherInfo setCanopyTemperature(Double canopyTemperature);
    
    enum Identifier implements ColumnIdentifier<WeatherInfo> {
        
        ID                    ("id"),
        STATION_NUMBER        ("station_number"),
        TEMPERATURE           ("temperature"),
        CURRENT_WEATHER       ("current_weather"),
        WIND_DIRECTION        ("wind_direction"),
        WIND_LEVEL            ("wind_level"),
        PM_LEVEL              ("pm_level"),
        RELA_HUMI             ("rela_humi"),
        RAIN_COUNT            ("rain_count"),
        CREATE_TIME           ("create_time"),
        OBSERVATION_DATA_DATE ("observation_data_date"),
        UPDATE_TIME           ("update_time"),
        DEVICE_ID             ("device_id"),
        CANOPY_TEMPERATURE    ("canopy_temperature");
        
        private final String columnId;
        private final TableIdentifier<WeatherInfo> tableIdentifier;
        
        Identifier(String columnId) {
            this.columnId        = columnId;
            this.tableIdentifier = TableIdentifier.of(    getDbmsId(), 
                getSchemaId(), 
                getTableId());
        }
        
        @Override
        public String getDbmsId() {
            return "cm";
        }
        
        @Override
        public String getSchemaId() {
            return "cm";
        }
        
        @Override
        public String getTableId() {
            return "weather_info";
        }
        
        @Override
        public String getColumnId() {
            return this.columnId;
        }
        
        @Override
        public TableIdentifier<WeatherInfo> asTableIdentifier() {
            return this.tableIdentifier;
        }
    }
}